/**
 * Copyright(c) 2020 NESENSOR.
 * <p>
 * History:
 * 2019/9/12 0012 14:13 Created by Author_zero
 */
package com.funtl.spring.cloud.alibaba.provider.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

/**
 * TODO: Must write comments.
 *
 * @author <a href="mailto:Author_zero@nesensor.com">Author_zero</a> 
 * @version 1.0 2019/9/12 0012 14:13
 */
@RestController
public class EchoController {

    @Value("${server.port}")
    private String port;
    @GetMapping(value = "/lb")
    public String lb() {
        return "Hello Nacos Provider i am from port: " + port;
    }

    @GetMapping(value = "/echo/{string}")
    public String echo(@PathVariable("string") String string) {
        return "Hello Nacos Provider" + string;
    }
}
